/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package 解析.node.charproperty.支持补集;

import 解析.Pattern;
import 解析.node.charproperty.支持补集.CharPropertyNames;

/**
 *
 * @author yanxi
 */
public class Range预定义POSIX字符类 extends CharProperty支持补集{
    public int lower;
    public int upper;
    public Range预定义POSIX字符类(int lower, int upper) {
        this.lower=lower; 
        this.upper=upper; 
    }
    
    @Override
    public boolean isSatisfiedBy正集 (int ch) {
        return Pattern.inRange(lower, ch, upper);
    }
    
    @Override
    public String toString正集(){ 
        return "\\p{"+CharPropertyNames.mapRange.get(""+lower+""+upper)+"}"; 
    }
    @Override
    public String toString补集(){ 
        return "\\P{"+CharPropertyNames.mapRange.get(""+lower+""+upper)+"}"; 
    }
}
